package com.jbm.onehome.iface;

import com.jbm.core.iface.IAcross;

import javax.persistence.*;

/**
 * Created by root on 17-9-19.
 */
@Entity
@Table(name = "fun_group", schema = "", catalog = "")
public class FunGroupEntity extends IAcross
{
	private int itemId;
	private int funId;
	private int subId;

	@Id
	@Column(name = "item_id", nullable = false)
	public int getItemId()
	{
		return itemId;
	}

	public void setItemId(int itemId)
	{
		this.itemId = itemId;
	}

	@Basic
	@Column(name = "fun_id", nullable = false)
	public int getFunId()
	{
		return funId;
	}

	public void setFunId(int funId)
	{
		this.funId = funId;
	}

	@Basic
	@Column(name = "sub_id", nullable = false)
	public int getSubId()
	{
		return subId;
	}

	public void setSubId(int subId)
	{
		this.subId = subId;
	}

	@Override
	public boolean equals(Object o)
	{
		if (this == o) return true;
		if (o == null || getClass() != o.getClass()) return false;

		FunGroupEntity that = (FunGroupEntity) o;

		if (itemId != that.itemId) return false;
		if (funId != that.funId) return false;
		if (subId != that.subId) return false;

		return true;
	}

	@Override
	public int hashCode()
	{
		int result = itemId;
		result = 31 * result + funId;
		result = 31 * result + subId;
		return result;
	}
}
